STEP 10: Let's add more strings to the list so that Sophia will see more pets.

One way to add an item into a list is to add a comma after the last value and and type the new list item.

  • After "pig" type "puppy".
  • Make sure that "puppy" is inside the brackets [] and separated from "pig" by a comma.
  • Run your code: how many times does the loop run? Notice how the onstage list display changes too!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)